package thread;


public class ThreadInfoDemo {
    public static void main(String[] args) {
        Thread main = Thread.currentThread();
        System.out.println(main);
        dosom();
    }
    public static void dosom(){
        Thread t = Thread.currentThread();
        System.out.println("运行doSome方法的线程："+t);
        System.out.println("线程的名字:"+t.getName());
        System.out.println("线程的唯一标识:"+t.getId());
        System.out.println("线程的优先级:"+t.getPriority());
        System.out.println("线程是否活着:"+t.isAlive());
        System.out.println("线程是否为守护线程:"+t.isDaemon());
        System.out.println("线程是否被中断:"+t.isInterrupted());


    }
}
